<template>
  <div>
    <h3>Part2</h3>
    <p>有名字的插槽：</p>
    <slot name="main" :list="list"></slot>
    <p>default插槽：</p>
    <slot :title="s"></slot>
  </div>
</template>

<script setup lang='ts' name="Part2">
import { ref, reactive } from 'vue'

let s = ref("123456789")
let list = reactive([
  {
    id:1,
    name:"孙悟空",
    hobby:"蟠桃"
  },
  {
    id:2,
    name:"唐僧",
    hobby:"念经"
  },
  {
    id:3,
    name:"猪八戒",
    hobby:"嫦娥"
  },
])

</script>


<style lang='scss' scoped>

</style>